package com.senlingspace.system.service.impl;

import java.util.Collections;
import java.util.List;

import com.senlingspace.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.senlingspace.system.mapper.SlkjRefundRecordMapper;
import com.senlingspace.system.domain.SlkjRefundRecord;
import com.senlingspace.system.service.ISlkjRefundRecordService;

/**
 * 退款记录Service业务层处理
 *
 * @author SenlingSpace
 * @date 2024-07-25
 */
@Service
public class SlkjRefundRecordServiceImpl implements ISlkjRefundRecordService {
    @Autowired
    private SlkjRefundRecordMapper slkjRefundRecordMapper;

    /**
     * 查询退款记录
     *
     * @param id 退款记录主键
     * @return 退款记录
     */
    @Override
    public SlkjRefundRecord selectSlkjRefundRecordById(Long id) {
        return slkjRefundRecordMapper.selectSlkjRefundRecordById(id);
    }

    @Override
    public SlkjRefundRecord selectSlkjRefundRecordByIdIncludeAdditionalInfo(Long id) {
        return slkjRefundRecordMapper.selectSlkjRefundRecordByIdIncludeAdditionalInfo(id);
    }

    /**
     * 查询退款记录列表
     *
     * @param slkjRefundRecord 退款记录
     * @return 退款记录
     */
    @Override
    public List<SlkjRefundRecord> selectSlkjRefundRecordList(SlkjRefundRecord slkjRefundRecord) {
        return slkjRefundRecordMapper.selectSlkjRefundRecordList(slkjRefundRecord);
    }

    @Override
    public List<SlkjRefundRecord> selectSlkjRefundRecordListIncludeAdditionalInfo(SlkjRefundRecord slkjRefundRecord) {
        return slkjRefundRecordMapper.selectSlkjRefundRecordListIncludeAdditionalInfo(slkjRefundRecord);
    }

    /**
     * 新增退款记录
     *
     * @param slkjRefundRecord 退款记录
     * @return 结果
     */
    @Override
    public int insertSlkjRefundRecord(SlkjRefundRecord slkjRefundRecord) {
        return slkjRefundRecordMapper.insertSlkjRefundRecord(slkjRefundRecord);
    }

    /**
     * 修改退款记录
     *
     * @param slkjRefundRecord 退款记录
     * @return 结果
     */
    @Override
    public int updateSlkjRefundRecord(SlkjRefundRecord slkjRefundRecord) {
        slkjRefundRecord.setUpdateTime(DateUtils.getNowDate());
        return slkjRefundRecordMapper.updateSlkjRefundRecord(slkjRefundRecord);
    }

    /**
     * 批量删除退款记录
     *
     * @param ids 需要删除的退款记录主键
     * @return 结果
     */
    @Override
    public int deleteSlkjRefundRecordByIds(Long[] ids) {
        return slkjRefundRecordMapper.deleteSlkjRefundRecordByIds(ids);
    }

    /**
     * 删除退款记录信息
     *
     * @param id 退款记录主键
     * @return 结果
     */
    @Override
    public int deleteSlkjRefundRecordById(Long id) {
        return slkjRefundRecordMapper.deleteSlkjRefundRecordById(id);
    }
}
